namespace Mytodotodaylist.Core.Events
{
    using System;

    public class Event
    {
        public Event()
        {
            Frequency = Periodicity.EveryDay;
        }

        public Guid Id { get; set; }
        public string Name { get; set; }
        public DateTime Date { get; set; }
        public Periodicity Frequency { get; set; }

        public override bool Equals(object obj)
        {
            if (!(obj is Event))
                return false;
            
            var parEv = (Event)obj;

            return 
                parEv.Name.Equals(Name) && 
                parEv.Date.Equals(Date) &&
                parEv.Frequency.Equals(Frequency);
        }
    }

    public enum Periodicity
    {
        None = 0,
        OnDate = 1,
        EveryDay = 2,
        Scheduled = 3
    }
}